import axios from '@/config/httpConfig'


//登录
export function login(data) {
	return axios.post(`/login`, data, {
		headers: {
			'Content-Type': 'multipart/form-data'
		}
	})
}

//获取分类
export function getCategoryList(data) {
	return axios.get(`/vms/v1/category/list`, data)
}
//新增修改分类
export function addCategory(data) {
	return axios.post(`/vms/v1/category/save`, data)
}

//删除分类
export function delCategory(data) {
	return axios.post(`/vms/v1/category/delete`, data)
}

//添加视频
export function addVideo(data) {
	return axios.post(`/vms/v1/video/save`, data)
}

//删除视频
export function delVideo(data) {
	return axios.post(`/vms/v1/video/delete`, data)
}

//获取视频详情
export function getVideoInfo(data) {
	return axios.get(`/vms/v1/video/${data.id}`)
}

//轮播图列表
export function getBannerList(data) {
	return axios.get(`/vms/v1/banner/list`, data)
}

//添加轮播图
export function addBanner(data) {
	return axios.post(`/vms/v1/banner/save`, data)
}

//删除轮播图
export function delBanner(data) {
	return axios.post(`/vms/v1/banner/delete`, data)
}

//获取七牛token
export function getVideoToken(data) {
	return axios.get(`/vms/v1/video/upToken?bucket=vms-temp`)
}

//提交转码请求
export function setVideoPfop(data) {
	return axios.post(`/vms/v1/video/pfop`,data)
}

//查询转码请求
export function getVideoPfopStatus(data) {
	return axios.get(`/vms/v1/video/pfop/status`,data)
}

//获取视频列表

export function getVideoList(data) {
	return axios.get(`/vms/v1/video/list`, data)
}



//获取短视频列表

export function getShortList(data) {
	return axios.get(`/vms/v1/short/list`, data)
}

//删除短视频
export function delShort(data) {
	return axios.post(`/vms/v1/short/delete`,data)
}


//通过
export function reviewShort(data) {
	return axios.post(`/vms/v1/short/review`,data)
}


//驳回
export function setActivity(data) {
	return axios.post(`/vms/v1/activity/save`,data)
}

export function delActivity(data) {
	return axios.post(`/vms/v1/activity/delete`,data)
}


export function getActivityList(data) {
	return axios.get(`/vms/v1/activity/list`,data)
}


export function getActivityDetail(data) {
	return axios.get(`/vms/v1/activity/${data.id}`)
}

export function getActivityUserList(data) {
	return axios.get(`/vms/v1/activity/detail/list`,data)
}

export function delActivityUser(data) {
	return axios.post(`/vms/v1/activity/detail/user/delete`,data)
}


export function getActivityUserDetail(data) {
	return axios.get(`/vms/v1/activity/detail/${data.id}`)
}